import { request } from 'umi';

// 获取页面管理数据
export function getPage(payload:any) {
    let params = {
      page:payload.page,
      pageSize:payload.pageSize,
      name:payload.name,
      path:payload.path,
      status:payload.status
    }
    return request('/api/page', {
        params
    });
}
// 获取发布数据
export function getPagepublish(payload:any){
  console.log(payload)
  return request(`/api/page/${payload.id}`,{
    method:'PATCH',
    data:{
      status:payload.statusId
    }
  })
}
// 获取删除数据
export function getPageDEle(id:string){
  console.log(id)
  return request(`/api/page/${id}`,{
    method:'DELETE',
  })
}